import { randomChoice } from "../../../../../core/utils/utils";
import { attrDefine } from "../../../../defines/attr_define";
import { LimbsTypeDefine } from "../../../../defines/people_limbs";
import { genderDefine, RaceDefine } from "../../../../defines/race_define";
import { BasicNpc } from "../../../npc-control/basic_npc";
import dialogues from "./dialogues";
import message from "./message";

export default class NpcNode extends BasicNpc {
  constructor(...params) {
    super(...params);
  }

  getName(){
    return '鸡'
  }

  getPeopleAttr(){
    return {
      race: RaceDefine.demon.key,
      gender: randomChoice(Object.values(genderDefine)),
      basicAttr: {
        diff: .1,
        [attrDefine.ageMax.key]: 10,
        [attrDefine.blood.key]: 3,
        [attrDefine.agile.key]: 15,
      },
      useAttr: {
        age: ~~(Math.random() * 5) + 1,
      },
      limbs: [
        { key: LimbsTypeDefine.head.key },
        { key: LimbsTypeDefine.body.key },
        { key: LimbsTypeDefine.wing.key, text: '左翅', power: .5 },
        { key: LimbsTypeDefine.wing.key, text: '右翅', power: .5 },
        { key: LimbsTypeDefine.foot.key, text: '左爪', power: 2 },
        { key: LimbsTypeDefine.foot.key, text: '右爪', power: 2 },
      ]
    }
  }
  
  messageDefine(){
    return message;
  }

  dialogueDefine(){
    return dialogues;
  }
}
